// pages/order/index.js
var app = getApp();
var rootDocment = app.globalData.postUrl;
import {
    throttle
} from '../../utils/common.js'
Page({
    /**
     * 页面的初始数据
     */
    data: {
        //提交表单所需数据
        submit_data: {
            link_name: '',
            link_tel: '',
            link_addr: '',
            goods_id: [],
            goods_spec: [],
            goods_price: [],
            goods_amount: [],
            order_price: 0,
            send_type: 0,
            send_price: 0,
            coupon_id: 0,
            coupon_price: 0,
            is_exchange: 1,
            exchange_jf: 0,
            exchange_price: 0,
            rebate_price: 0,
            discount_price: 0,
            discount_jf: 0,
            discount_coupon_id: 0,
            m_jf: 0,
            m_tc: 0,
            pay_price: 0,
            is_cart: 0
        },
        send_data: {
            index: 0,
            price: 0,
            ids: [0],
            txt: ['快递']
        },
        goods_list: [],
        coupon_data: {
            index: 0,
            price: [0],
            ids: [0],
            txt: ['不使用优惠券']
        },
        userInfo: {},
        miniapp_config: {},
        is_vip_data: 0,
        options: null,
        isCard: false,
        popupShow: false,
        isPassword: true,
        userName: '5638479851265654',
        passWord: '',
        m_info: '', //备注
        me_spec_key: '',
        is_jinhuo: 0,
        is_member_day: 0,
        is_99_vip: 0,
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        console.log('生命周期函数--监听页面加载', options)
        if (options.type == '1') {
            this.setData({
                isCard: true
            })
        }
        if (options.cardId) {
            this.setData({
                userName: options.cardId
            })
        }
        if (options.is_jinhuo) {
            this.setData({
                is_jinhuo: Number(options.is_jinhuo)
            })
        }
        if (options.is_member_day) {
            this.setData({
                is_member_day: Number(options.is_member_day)
            })
        }
        if (options.is_99_vip) {
            this.setData({
                is_99_vip: Number(options.is_99_vip)
            })
        }
        this.setData({
            options: options,
        });
        var that = this;
        //用户授权登录
        // app.login(function (userInfo) {
        //   console.log('走这里了','============>')
        //   that.setData({
        //     userInfo: userInfo
        //   });
        //   that.getMiniappConfig();
        //   //that.getAddress();
        //   that.setPickUpData();
        //   // that.setData({
        //   //   options: options,
        //   // });

        // });
    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {
        var that = this

        this.setData({
            is_shop: wx.getStorageSync('is_shop')
        })

        app.login(function (userInfo) {
            wx.showLoading({
                title: '加载中',
                mask: true
            })
            console.log('走这里了', '============>', userInfo)
            that.setData({
                userInfo: userInfo
            });
            that.getMiniappConfig();
            //that.getAddress();
            that.setPickUpData();
            that.getAddress();
            // that.setData({
            //   options: options,
            // });

        });

    },

    //获取小程序配置
    getMiniappConfig: function () {
        var that = this;
        var paraArr = new Array();
        var sign = app.signature(paraArr);
        wx.request({
            url: rootDocment + '/api/comm_get/getMiniappConfig',
            data: {
                sign: sign
            },
            method: 'GET',
            header: {},
            success: function (res) {
                //console.log(res,'==============>getMiniappConfig')
                that.setData({
                    miniapp_config: res.data
                });
            }
        })
    },

    //获取自提点信息
    setPickUpData: function () {
        var that = this;
        var paraArr = new Array();
        var sign = app.signature(paraArr);
        var send_data = that.data.send_data;
        wx.request({
            url: rootDocment + '/api_pickup',
            data: {
                sign: sign
            },
            method: 'GET',
            header: {},
            success: function (res) {
                if (res.data.length > 0) {
                    for (var i = 0; i < res.data.length; i++) {
                        send_data.ids.push(res.data[i]['id']);
                        send_data.txt.push('自提(' + res.data[i]['shop'] + ')');
                    }
                }
                that.setData({
                    send_data
                });
            }
        })
    },

    //切换快递方式
    sendChange: function (e) {
        var that = this;
        var submit_data = that.data.submit_data;
        var send_data = that.data.send_data;
        send_data.index = e.detail.value;
        submit_data.send_type = send_data.ids[e.detail.value];
        if (e.detail.value > 0) { //自提
            submit_data.send_price = 0
        } else {
            submit_data.send_price = send_data.price;
        }
        that.setData({
            submit_data,
            send_data
        })
        that.payPrice();
    },

    //直接购买获取单个商品信息(商品ID,规格key,数量)
    setGoodsData: function (p0, p1, p2) {
        var that = this;
        var goods_list = [];
        var paraArr = new Array();
        paraArr['goods_id'] = p0;
        paraArr['spec_key'] = p1;
        paraArr['amount'] = p2;
        var sign = app.signature(paraArr);
        wx.request({
            url: rootDocment + '/api/comm_get/getOrderGoods',
            data: {
                goods_id: p0,
                spec_key: p1,
                amount: p2,
                sign: sign
            },
            method: 'GET',
            header: {},
            success: function (res) {
                // if (wx.getStorageSync('is_vip') && res.data.is_vip) {
                //   res.data.price = res.data.vip_price
                // }
                if (that.data.is_shop > 0) {
                    res.data.price = res.data.vip_price
                }

                goods_list.push(res.data);
                console.log('多规格111-=1-1=-1=', res.data.spec_key_name);
                that.setData({
                    goods_list: goods_list,
                    is_vip_data: res.data.is_vip,
                    me_spec_key: res.data.spec_key_name
                });
                that.setOrderPrice()
            },
            fail: function (err) {
                wx.hideLoading()
            }
        })
    },
    setOrderPrice: throttle(function () {
        //console.log(111,'获取价格')
        wx.showLoading({
            title: '加载中',
            mask: true
        })
        var that = this;
        var submit_data = that.data.submit_data;

        var goodsList = [];
        goodsList = that.data.goods_list;
        for (var i = 0; i < goodsList.length; i++) {
            submit_data.goods_id = []
            submit_data.goods_spec = []
            submit_data.goods_price = []
            submit_data.goods_amount = []
        }
        for (var i = 0; i < goodsList.length; i++) {
            submit_data.goods_id.push(goodsList[i].goods_id);
            submit_data.goods_spec.push(goodsList[i].spec_key_name);
            submit_data.goods_price.push(goodsList[i].price);
            submit_data.goods_amount.push(goodsList[i].amount);
        }
        // let is_vip_data = wx.getStorageSync('is_vip')
        // if (is_vip_data) {

        // }
        goodsList.forEach((item, index) => {
            if (item.is_vip == 1) {
                that.setData({
                    is_vip_data: item.is_vip
                })
                return
            }
        });
        var paraArr = new Array();
        paraArr['goods_id'] = submit_data.goods_id.join(",");
        paraArr['goods_price'] = submit_data.goods_price.join(",");
        paraArr['goods_amount'] = submit_data.goods_amount.join(",");
        paraArr['user_id'] = that.data.userInfo.userID;
        paraArr['province'] = that.data.on_link_addr;

        var sign = app.signature(paraArr);

        wx.request({
            url: rootDocment + '/api/comm_get/getBuyInfo',
            data: {
                goods_id: paraArr['goods_id'],
                goods_price: paraArr['goods_price'],
                goods_amount: paraArr['goods_amount'],
                user_id: paraArr['user_id'],
                province: paraArr['province'],
                sign: sign
            },
            method: 'GET',
            header: {},
            success: function (res) {
                console.log('价格1')
                wx.hideLoading()
                submit_data.order_price = res.data.order_price;
                submit_data.exchange_jf = res.data.dh_jf;
                submit_data.exchange_price = res.data.dh_price;
                submit_data.rebate_price = res.data.rebate_price;
                submit_data.discount_price = res.data.discount_price;
                submit_data.discount_jf = res.data.discount_jf;
                submit_data.discount_coupon_id = res.data.discount_coupon;
                submit_data.m_jf = res.data.goods_jf;
                submit_data.m_tc = res.data.order_tc;
                submit_data.send_price = res.data.send_price;

                that.setData({
                    submit_data
                });
                that.setCouponData();
                that.payPrice();
            },
            fail: function (err) {
                console.log('价格2')
                wx.hideLoading()
            }
        })
    }, 2000),
    //获取订单商品订单价，运费，优惠，实付价等信息
    setOrderPrice1: function () {
        // wx.showLoading({
        //   title:'加载中',
        //   mask:true
        // })
        var that = this;
        var submit_data = that.data.submit_data;

        var goodsList = [];
        goodsList = that.data.goods_list;
        for (var i = 0; i < goodsList.length; i++) {
            submit_data.goods_id = []
            submit_data.goods_spec = []
            submit_data.goods_price = []
            submit_data.goods_amount = []
        }
        for (var i = 0; i < goodsList.length; i++) {
            submit_data.goods_id.push(goodsList[i].goods_id);
            submit_data.goods_spec.push(goodsList[i].spec_key_name);
            submit_data.goods_price.push(goodsList[i].price);
            submit_data.goods_amount.push(goodsList[i].amount);
        }
        // let is_vip_data = wx.getStorageSync('is_vip')
        // if (is_vip_data) {

        // }
        goodsList.forEach((item, index) => {
            if (item.is_vip == 1) {
                that.setData({
                    is_vip_data: item.is_vip
                })
                return
            }
        });
        var paraArr = new Array();
        paraArr['goods_id'] = submit_data.goods_id.join(",");
        paraArr['goods_price'] = submit_data.goods_price.join(",");
        paraArr['goods_amount'] = submit_data.goods_amount.join(",");
        paraArr['user_id'] = that.data.userInfo.userID;
        paraArr['province'] = that.data.on_link_addr;

        var sign = app.signature(paraArr);

        wx.request({
            url: rootDocment + '/api/comm_get/getBuyInfo',
            data: {
                goods_id: paraArr['goods_id'],
                goods_price: paraArr['goods_price'],
                goods_amount: paraArr['goods_amount'],
                user_id: paraArr['user_id'],
                province: paraArr['province'],
                sign: sign
            },
            method: 'GET',
            header: {},
            success: function (res) {
                wx.hideLoading()
                submit_data.order_price = res.data.order_price;
                submit_data.exchange_jf = res.data.dh_jf;
                submit_data.exchange_price = res.data.dh_price;
                submit_data.rebate_price = res.data.rebate_price;
                submit_data.discount_price = res.data.discount_price;
                submit_data.discount_jf = res.data.discount_jf;
                submit_data.discount_coupon_id = res.data.discount_coupon;
                submit_data.m_jf = res.data.goods_jf;
                submit_data.m_tc = res.data.order_tc;
                submit_data.send_price = res.data.send_price;

                that.setData({
                    submit_data
                });
                that.setCouponData();
                that.payPrice();
            },
            fail: function (err) {
                wx.hideLoading()
            }
        })
    },

    //获取优惠券
    setCouponData: function () {
        var that = this;

        var coupon_data = that.data.coupon_data;
        let data = {}
        if (typeof (that.data.options.goods_id) != "undefined") {
            data = {
                user_id: that.data.userInfo.userID,
                goods_id: that.data.options.goods_id,
                spec_key: that.data.options.spec_key,
                amount: that.data.options.amount,
            }
        } else {
            const myCart = wx.getStorageSync('myCart')
            if (myCart?.length > 0) {
                let goods_id = [],
                    spec_key = [],
                    amount = []

                myCart.forEach(item => {
                    goods_id.push(item.goods_id)
                    spec_key.push(item.spec_key)
                    amount.push(item.amount)
                })

                data.user_id = that.data.userInfo.userID
                data.goods_id = goods_id.join(',')
                data.spec_key = spec_key.join(',')
                data.amount = amount.join(',')
            }
        }


        wx.request({
            url: rootDocment + '/api/coupon/orderCouponList',
            data: data,
            method: 'GET',
            header: {},
            success: function (res) {
                for (var i in res.data) {
                    coupon_data.price.push(res.data[i].cut_price);
                    coupon_data.ids.push(res.data[i].id);
                    coupon_data.txt.push(res.data[i].title);
                }
                that.setData({
                    coupon_data
                });
            }
        })
    },
    passWordChange: function (e) { //输入框双向绑定
        console.log(e)
        this.setData({
            [e.target.dataset.id]: e.detail.value
        })
    },
    isPasswordChange(e) { //输入密码框
        this.setData({
            isPassword: !this.data.isPassword,
        })
    },
    bindTextAreaBlur(e) {
        console.log(e)
        this.setData({
            m_info: e.detail.value
        })
    },
    verify: throttle(function () { //验证榴莲卡密码
        let that = this
        let data = this.data
        var submit_data = that.data.submit_data;
        let pwd = data.passWord
        let id = data.userName
        let user_id = that.data.userInfo.userID
        let goods_spec = that.data.me_spec_key
        var paraArr = new Array();
        paraArr['id'] = id;
        paraArr['pwd'] = pwd.trim();
        paraArr['user_id'] = user_id;
        paraArr['link_name'] = submit_data.link_name.trim();
        paraArr['link_tel'] = submit_data.link_tel.trim();
        paraArr['link_address'] = submit_data.link_addr;
        paraArr['m_info'] = data.m_info;
        if (goods_spec) {
            paraArr['goods_spec'] = goods_spec.trim();;
        }

        var sign = app.signature(paraArr, 1);
        console.log('csccs-=-=-=--=', id, pwd, user_id, submit_data.link_name, submit_data.link_tel, submit_data.link_addr, data.m_info)
        if (submit_data.link_name == '') {
            wx.showModal({
                title: '提示',
                content: '请选择收货地址!'
            })
            return
        }
        if (pwd == "") {
            wx.showToast({
                title: '请输入密码',
                icon: 'none'
            })
            return
        }
        wx.showLoading({
            title: '兑换中',
            mask: true
        })
        let datas = {}
        if (goods_spec) {
            datas = {
                id: id,
                pwd: pwd.trim(),
                user_id: user_id,
                link_name: submit_data.link_name.trim(),
                link_tel: submit_data.link_tel.trim(),
                link_address: submit_data.link_addr,
                m_info: data.m_info,
                goods_spec: goods_spec.trim(),
                sign: sign
            }
        } else {
            datas = {
                id: id,
                pwd: pwd,
                user_id: user_id,
                link_name: submit_data.link_name.trim(),
                link_tel: submit_data.link_tel.trim(),
                link_address: submit_data.link_addr,
                m_info: data.m_info,
                sign: sign
            }
        }
        wx.request({
            url: rootDocment + '/api/Redeem/pwdVerify',
            data: datas,
            method: 'POST',
            header: {},
            success: function (res) {
                wx.hideLoading()
                if (res.data.code == 1001) {
                    console.log(res)
                    app.gourl('orderSuccess/orderSuccess')
                } else {
                    wx.showToast({
                        title: res.data.msg,
                        icon: 'none'
                    })
                }
                //console.log(res,'==============>getMiniappConfig')

            },
            fail: function (err) {
                wx.hideLoading()
            }
        })
    }),
    cardSubmit() { //打开榴莲兑换弹窗
        console.log(this.data.userInfo)
        this.setData({
            popupShow: true
        })
    },
    onClose() { //关闭榴莲兑换弹窗
        console.log(111)
        this.setData({
            popupShow: false
        })
    },

    //切换优惠券
    couponChange: function (e) {
        var that = this;
        var index = e.detail.value;
        that.setData({
            'coupon_data.index': index,
            'submit_data.coupon_id': that.data.coupon_data.ids[index],
            'submit_data.coupon_price': that.data.coupon_data.price[index]
        })
        that.payPrice();
    },

    //是否积分抵扣
    switchChange: function (e) {
        var that = this;
        var is_exchange = 1;
        if (e.detail.value == false) {
            is_exchange = 0;
        }
        that.setData({
            'submit_data.is_exchange': is_exchange
        })
        that.payPrice();
    },

    //计算应付价格
    payPrice: function () {
        var that = this;
        var submit_data = that.data.submit_data;
        //应付款=订单价+运费-会员折扣-订单折扣-优惠券抵扣-积分兑换
        var pay_price = parseFloat(submit_data.order_price) + parseFloat(submit_data.send_price) - parseFloat(submit_data.rebate_price) - parseFloat(submit_data.discount_price) - parseFloat(submit_data.coupon_price);
        if (submit_data.is_exchange == 1) {
            pay_price = pay_price - parseFloat(submit_data.exchange_price);
        }
        submit_data.pay_price = pay_price.toFixed(2);
        that.setData({
            submit_data
        })
    },

    //我的地址
    goMyAddress: function () {
        app.redirect('user/myaddress', '');
    },

    /**
     * 获取默认地址
     */
    getAddress: function () {
        console.log('收货地址了')
        var that = this;
        var options = this.data.options
        var paraArr = new Array();
        paraArr['user_id'] = that.data.userInfo.userID;
        paraArr['index'] = 1;
        var sign = app.signature(paraArr);
        wx.request({
            url: rootDocment + '/api_address',
            data: {
                user_id: paraArr['user_id'],
                index: paraArr['index'],
                sign: sign
            },
            method: 'GET',
            header: {},
            success: function (res) {
                console.log(res)
                if (res.data.length > 0) {
                    let address1 = res.data[0]['address1'] ? res.data[0]['address1'] : res.data[0]['address']
                    that.setData({
                        'submit_data.link_name': res.data[0]['name'],
                        'submit_data.link_tel': res.data[0]['tel'],
                        'submit_data.link_addr': res.data[0]['province'] + " " + res.data[0]['city'] + " " + res.data[0]['county'] + " " + address1,
                        on_link_addr: res.data[0]['province']
                    }, () => {
                        if (typeof (options.goods_id) != "undefined") {
                            console.log('直接购买')
                            //直接购买
                            that.setGoodsData(options.goods_id, options.spec_key, options.amount);
                        } else {
                            //购物车提交
                            var total = options.total;
                            var my_goods_list = wx.getStorageSync('myCart') || []
                            that.setData({
                                goods_list: my_goods_list,
                                'submit_data.is_cart': 1
                            });
                            that.setOrderPrice()
                        }
                        // console.log('偏远')
                        // that.setOrderPrice()

                    });
                } else {
                    if (typeof (options.goods_id) != "undefined") {
                        console.log('直接购买')
                        //直接购买
                        that.setGoodsData(options.goods_id, options.spec_key, options.amount);
                    } else {
                        //购物车提交
                        var total = options.total;
                        var my_goods_list = wx.getStorageSync('myCart') || []
                        that.setData({
                            goods_list: my_goods_list,
                            'submit_data.is_cart': 1
                        });
                        that.setOrderPrice()
                    }
                }
            },
            fail: function (err) {
                wx.hideLoading()
                if (typeof (options.goods_id) != "undefined") {
                    console.log('直接购买')
                    //直接购买
                    that.setGoodsData(options.goods_id, options.spec_key, options.amount);
                } else {
                    //购物车提交
                    var total = options.total;
                    var my_goods_list = wx.getStorageSync('myCart') || []
                    that.setData({
                        goods_list: my_goods_list,
                        'submit_data.is_cart': 1
                    });
                    that.setOrderPrice()
                }
            }
        })

    },

    /**
     * 提交订单
     */
    submitOrder: function (e) {

        var that = this;
        var data = e.detail.value;
        var formID = e.detail.formId;
        var submit_data = that.data.submit_data;
        var miniapp_config = that.data.miniapp_config;
        if (submit_data.link_name == '') {
            wx.showModal({
                title: '提示',
                content: '请选择收货地址!'
            })
        } else {
            console.log('submitOrder')
            if (submit_data.pay_price > 0) {
                var goods_id = submit_data.goods_id.join(",");
                var goods_spec = submit_data.goods_spec.join(",");
                var goods_price = submit_data.goods_price.join(",");
                var goods_amount = submit_data.goods_amount.join(",");

                if (miniapp_config.open_msg == '1') {
                    wx.request({
                        url: rootDocment + '/api_order',
                        data: {
                            link_name: submit_data.link_name,
                            link_tel: submit_data.link_tel,
                            link_addr: submit_data.link_addr,
                            goods_id: goods_id,
                            goods_spec: goods_spec,
                            goods_price: goods_price,
                            goods_amount: goods_amount,
                            order_price: submit_data.order_price,
                            send_type: submit_data.send_type,
                            send_price: submit_data.send_price,
                            coupon_id: submit_data.coupon_id,
                            coupon_price: submit_data.coupon_price,
                            is_exchange: submit_data.is_exchange,
                            exchange_jf: submit_data.exchange_jf,
                            exchange_price: submit_data.exchange_price,
                            rebate_price: submit_data.rebate_price,
                            discount_price: submit_data.discount_price,
                            discount_jf: submit_data.discount_jf,
                            discount_coupon_id: submit_data.discount_coupon_id,
                            m_jf: submit_data.m_jf,
                            m_tc: submit_data.m_tc,
                            pay_price: submit_data.pay_price,
                            order_type: 0,
                            m_info: data.m_info,
                            m_formID: formID,
                            is_cart: submit_data.is_cart,
                            user_id: that.data.userInfo.userID,
                            is_vip: that.data.is_vip_data,
                            is_jinhuo: that.data.is_jinhuo,
                            is_member_day: that.data.is_member_day,
                            is_99_vip: that.data.is_99_vip,
                        },
                        method: 'POST',
                        header: {},
                        success: function (res) {
                            console.log(res, '????')
                            if (res.data.code == 1001) {

                                app.gourl('pay/index', 'sn=' + res.data.data.sn);
                                // resolve(res.data.data.sn)
                            } else {

                                if (res.data.code == 1003) {
                                    wx.showModal({
                                        title: '提示',
                                        content: res.data.msg || '绑定手机号才可购买',
                                        success(res) {
                                            if (res.confirm) {
                                                wx.navigateTo({
                                                    url: '/pages/shouji/shouji',
                                                })
                                            } else if (res.cancel) {
                                                console.log('用户点击取消')
                                            }

                                        }
                                    })

                                } else {
                                    wx.showModal({
                                        title: '提示',
                                        content: res.data.msg
                                    })
                                }
                                // reject()
                            }
                        }
                    })
                    wx.requestSubscribeMessage({
                        tmplIds: [miniapp_config.pay_temp, miniapp_config.send_temp],
                        success(res) {

                        },
                        fail(res) {
                            console.log(res, 'res')
                            wx.showModal({
                                title: '提示',
                                content: res.errMsg
                            })
                            //reject(res)
                        }
                    })
                } else {
                    wx.request({
                        url: rootDocment + '/api_order',
                        data: {
                            link_name: submit_data.link_name,
                            link_tel: submit_data.link_tel,
                            link_addr: submit_data.link_addr,
                            goods_id: goods_id,
                            goods_spec: goods_spec,
                            goods_price: goods_price,
                            goods_amount: goods_amount,
                            order_price: submit_data.order_price,
                            send_type: submit_data.send_type,
                            send_price: submit_data.send_price,
                            coupon_id: submit_data.coupon_id,
                            coupon_price: submit_data.coupon_price,
                            is_exchange: submit_data.is_exchange,
                            exchange_jf: submit_data.exchange_jf,
                            exchange_price: submit_data.exchange_price,
                            rebate_price: submit_data.rebate_price,
                            discount_price: submit_data.discount_price,
                            discount_jf: submit_data.discount_jf,
                            discount_coupon_id: submit_data.discount_coupon_id,
                            m_jf: submit_data.m_jf,
                            m_tc: submit_data.m_tc,
                            pay_price: submit_data.pay_price,
                            order_type: 0,
                            m_info: data.m_info,
                            m_formID: formID,
                            is_cart: submit_data.is_cart,
                            user_id: that.data.userInfo.userID,
                            is_vip: that.data.is_vip_data,
                            is_jinhuo: that.data.is_jinhuo,
                            is_member_day: that.data.is_member_day,
                            is_99_vip: that.data.is_99_vip,
                        },
                        method: 'POST',
                        header: {},
                        success: function (res) {
                            console.log(res, 'res======>?')
                            if (res.data.code == 1001) {
                                app.gourl('pay/index', 'sn=' + res.data.data.sn);
                                // resolve(res.data.data.sn)
                            } else {
                                if (res.data.code == 1003) {
                                    wx.showModal({
                                        title: '提示',
                                        content: res.data.msg || '绑定手机号才可购买',
                                        success(res) {
                                            if (res.confirm) {
                                                wx.navigateTo({
                                                    url: '/pages/shouji/shouji',
                                                })
                                            } else if (res.cancel) {
                                                console.log('用户点击取消')
                                            }

                                        },
                                        fail(err) {
                                            console.log(err)
                                        }
                                    })

                                } else {
                                    wx.showModal({
                                        title: '提示',
                                        content: res.data.msg
                                    })
                                }

                                // reject(res)
                            }
                        }
                    })
                }
            }

        }
        // })
    },

})